package com.ruoyi.logistics.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.logistics.mapper.PostmanMapper;
import com.ruoyi.logistics.domain.Postman;
import com.ruoyi.logistics.service.IPostmanService;

/**
 * 快递员信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-30
 */
@Service
public class PostmanServiceImpl implements IPostmanService 
{
    @Autowired
    private PostmanMapper postmanMapper;

    /**
     * 查询快递员信息
     * 
     * @param userId 快递员信息主键
     * @return 快递员信息
     */
    @Override
    public Postman selectPostmanByUserId(Long userId)
    {
        return postmanMapper.selectPostmanByUserId(userId);
    }

    /**
     * 查询快递员信息列表
     * 
     * @param postman 快递员信息
     * @return 快递员信息
     */
    @Override
    public List<Postman> selectPostmanList(Postman postman)
    {
        return postmanMapper.selectPostmanList(postman);
    }

    /**
     * 新增快递员信息
     * 
     * @param postman 快递员信息
     * @return 结果
     */
    @Override
    public int insertPostman(Postman postman)
    {
        return postmanMapper.insertPostman(postman);
    }

    /**
     * 修改快递员信息
     * 
     * @param postman 快递员信息
     * @return 结果
     */
    @Override
    public int updatePostman(Postman postman)
    {
        return postmanMapper.updatePostman(postman);
    }

    /**
     * 批量删除快递员信息
     * 
     * @param userIds 需要删除的快递员信息主键
     * @return 结果
     */
    @Override
    public int deletePostmanByUserIds(Long[] userIds)
    {
        return postmanMapper.deletePostmanByUserIds(userIds);
    }

    /**
     * 删除快递员信息信息
     * 
     * @param userId 快递员信息主键
     * @return 结果
     */
    @Override
    public int deletePostmanByUserId(Long userId)
    {
        return postmanMapper.deletePostmanByUserId(userId);
    }
}
